<%--
  Created by IntelliJ IDEA.
  User: 黑白客
  Date: 2019/5/28
  Time: 17:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%!
    private int initVar=0;
    private int serviceVar=0;
    private int destoryVar=0;
%>

<%!
    public void JspInit(){
        initVar ++;
        System.out.println("JspInit被初始化了" + initVar + "次");
    }
    public void jspDestroy(){
        destoryVar ++ ;
        System.out.println("jspDestroy(); jsp被销毁了" + destoryVar +"次");
    }
%>

<%
    serviceVar ++ ;
    System.out.println("_jspService();jsp共响应了" + serviceVar
    + "次请求");

    String content1 = "初始化次数" + initVar;
    String content2 = "相应客户请求次数" + serviceVar;
    String content3 = "销毁次数" + destoryVar;
%>
<h1>菜鸟教程 JSP 测试实例</h1>
<p><%=content1 %></p>
<p><%=content2 %></p>
<p><%=content3 %></p>
</body>
</html>
